package com.example.baselibs.entity;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.List;

public class Result<T> implements Serializable {
    @SerializedName("status")
    private boolean status;
    @SerializedName("data")
    private List<T> data;

    @SerializedName("error")
    private String error;

    @SerializedName("sql")
    private String sql;

    @SerializedName("login")
    private boolean login;

    public boolean isLogin() {
        return login;
    }

    public void setLogin(boolean login) {
        this.login = login;
    }

    public boolean isStatus() {
        return status;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> list){
        data=list;
    }

    public void setError(String error) {
        this.error = error;
    }

    public String getError() {
        return error;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public void setSql(String sql) {
        this.sql = sql;
    }

    public String getSql() {
        return sql;
    }

    @Override
    public String toString() {
        return "Result{" +
                "status=" + status +
                ", data=" + data +
                ", error="+error+
                ", sql='" + sql + '\'' +
                ", login=" + login +
                '}';
    }
}
